package com.iotechn.unimall.admin.api.distribution;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.annotation.param.Range;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.dto.DistributionWithdrawDTO;
import com.iotechn.unimall.data.model.Page;

@HttpOpenApi(group = "admin.distributionwithdraw", description = "分销提现服务")
public interface AdminDistributionWithdrawService {

    @HttpMethod(description = "列表", permission = "operation:distributionwithdraw:list", permissionParentName = "运营管理", permissionName = "分销管理")
    public Page<DistributionWithdrawDTO> list(
            @HttpParam(name = "page", type = HttpParamType.COMMON, description = "订单页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员Id") Long adminId) throws ServiceException;

    @HttpMethod(description = "审核", permission = "operation:distributionwithdraw:audit", permissionParentName = "运营管理", permissionName = "分销管理")
    public String audit(
            @NotNull @HttpParam(name = "withdrawId", type = HttpParamType.COMMON, description = "提现id") Long withdrawId,
            @NotNull @Range(min = 1, max = 2) @HttpParam(name = "status", type = HttpParamType.COMMON, description = "欲变更为的状态") Integer status,
            @HttpParam(name = "ip", type = HttpParamType.IP, description = "ip") String ip,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员Id") Long adminId) throws ServiceException;

}
